package com;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 注意!!!!!!!!!!!!
 * 这个官网说不能和 @SpringbootApplication 或者@ComponentScanne 扫描到
 */
@Configuration
public class MyRule {

    @Bean
    public IRule iRule() {
        return new RandomRule(); //定义为随机访问
    }

}
